<?php 
/**  纸风车儿童摄影  ID=42 参团活动 **/
function hidtel($phone){
         return  preg_replace('/(1[34578]{1}[0-9])[0-9]{4}([0-9]{4})/i','$1****$2',$phone);
 } 
//截取utf8字符串 
function utf8Substr($str, $from, $len) 
{  
return preg_replace('#^(?:[\x00-\x7F]|[\xC0-\xFF][\x80-\xBF]+){0,'.$from.'}'. 
'((?:[\x00-\x7F]|[\xC0-\xFF][\x80-\xBF]+){0,'.$len.'}).*#s', 
'$1',$str); 
} 
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0,user-scalable=no" name="viewport" id="viewport" />
    <meta name="apple-mobile-web-app-capable" content="yes" />
    <meta name="apple-mobile-web-app-status-bar-style" content="black" />
    <title><?php echo $news['title']; ?></title>
    <meta name="description" content="微信模板" />
    <meta name="keywords" content="" /> 
    <link href="__PUBLIC__/styles/default/css/base.css" type="text/css" rel="stylesheet" />
    <link href="__PUBLIC__/styles/default/css/zfc.css?v=15" type="text/css" rel="stylesheet" />
    <script type="text/javascript" src="__PUBLIC__/styles/default/js/jquery-1.8.0.min.js" charset="utf-8"></script>
    <script type="text/javascript" src="__PUBLIC__/styles/default/js/scroll.js" charset="utf-8"></script>
    <script type="text/javascript">
      $(function(){
        setTimeout(function () { 
                $("div.list_lh").myScroll({
                  speed:60, 
                  rowHeight:25 
                });
        }, 10000);
        
      });
      </script>

    <script type="text/javascript">
    $(function(){
        countDown($("#dtime").text(),"#colockbox1");
        $('#name').focus(function(){
            $('.show').empty();
        });
        $('#tel').focus(function(){
            $('.show').empty();
        });
      });
      function countDown(time,id){
        var day_elem = $(id).find('.day');
        var hour_elem = $(id).find('.hour');
        var minute_elem = $(id).find('.minute');
        var second_elem = $(id).find('.second');
        var end_time = new Date(time).getTime(),//月份是实际月份-1
        sys_second = (end_time-new Date().getTime())/1000;
        var timer = setInterval(function(){
          if (sys_second > 1) {
            sys_second -= 1;
            var day = Math.floor((sys_second / 3600) / 24);
            var hour = Math.floor((sys_second / 3600) % 24);
            var minute = Math.floor((sys_second / 60) % 60);
            var second = Math.floor(sys_second % 60);
            day_elem && $(day_elem).text(day);//计算天
            $(hour_elem).text(hour<10?"0"+hour:hour);//计算小时
            $(minute_elem).text(minute<10?"0"+minute:minute);//计算分钟
            $(second_elem).text(second<10?"0"+second:second);//计算秒杀
          } else { 
            clearInterval(timer);
          }
        }, 1000);
      }
            
    function oncheck()
    {
        var tel = $('#tel').val();
        var name = $('#name').val();
        if(name == "" || tel == "")
        {
            $('.show').html("姓名或者手机号码不能为空!");
            return false;
        }
        re= /^(13[0-9]|15[012356789]|18[02356789]|14[57]|17[0-9])[0-9]{8}$/;
        if(!re.test(tel))
        {
            $('.show').html("手机号码格式不正确!");
            return false;
        }
        
        if(tel.length != 11)
        {
            $('.show').html("手机号码必须为11位数字!");
            return false;
        }
        
        return true;
    }
  </script>
      
<script src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
<script>
  wx.config({
    debug: false,
    appId: '{$signPackage["appId"]}',
    timestamp: '{$signPackage["timestamp"]}',
    nonceStr: '{$signPackage["nonceStr"]}',
    signature: '{$signPackage["signature"]}',
    jsApiList: [
      // 所有要调用的 API 都要加到这个列表中
      'onMenuShareTimeline','onMenuShareAppMessage'
    ]
  });
  wx.ready(function () {
    // 在这里调用 API
 
    wx.onMenuShareTimeline({
      title: "{$fx_user['name']}邀请您参加纸风车儿童摄影 年度感恩出品 金秋团拍来袭", // 分享标题
	  link: "http://www.dscm.com.cn__SELF__&fx_id={$fx_id}", // 分享链接
      desc: "纸风车儿童摄影年度感恩出品，网络定制套餐，团购价只需299元", // 分享描述
      imgUrl: "http://www.dscm.com.cn__PUBLIC__/styles/default/images/zfc_01.jpg", // 分享图标
      trigger: function () {
          //alert("点击分享：");
      },
      success: function () { 
          // 用户确认分享后执行的回调函数
          //alert("分享成功");
      },
      cancel: function () { 
          // 用户取消分享后执行的回调函数
          //alert("用户取消分享");
      }
    });
  
  	wx.onMenuShareAppMessage({
      title: "{$fx_user['name']}邀请您参加纸风车儿童摄影 年度感恩出品 金秋团拍来袭", // 分享标题
	  link: "http://www.dscm.com.cn__SELF__&fx_id={$fx_id}", // 分享链接
      desc: "纸风车儿童摄影年度感恩出品，网络定制套餐，团购价只需299元", // 分享描述
      	imgUrl: "http://www.dscm.com.cn__PUBLIC__/styles/default/images/zfc_01.jpg", // 分享图标
    	type: 'link', // 分享类型,music、video或link，不填默认为link
		success: function () { 
			// 用户确认分享后执行的回调函数  
		},
		cancel: function () { 
			// 用户取消分享后执行的回调函数
		}
	 });
  });
</script>
</head>
<body> 

	<!--<audio src="__PUBLIC__/styles/default/images/zfc.mp3" autoplay="autoplay" loop="loop"></audio>-->
    <div id="all">  
	
         <div class="header1">
          	<img src="__PUBLIC__/styles/default/images/zfc_01.jpg" width="100%" />
            <img src="__PUBLIC__/styles/default/images/zfc_02.jpg" width="100%" /> 
            <img src="__PUBLIC__/styles/default/images/zfc_034.jpg" width="100%" /> 
			<img src="__PUBLIC__/styles/default/images/zfc_04.jpg" width="100%" /> 
			<img src="__PUBLIC__/styles/default/images/zfc_05.jpg" width="100%" /> 
         </div>
         
        <!--<div style="margin-top:10px;background-color:#fff;font-size:20px;height:40px;line-height:40px;text-align:center;font-family:Arial, Helvetica, sans-serif;">活动倒计时，距离结束还有</div> -->
        <div id="dtime" style="display:none"><?php  echo date("Y/m/d H:i:s", $news['jssj']);?></div>
        <div class="colockbox" id="colockbox1" style="text-align:center;margin-bottom:0px;"><span class="day">00</span> 天 <span class="hour">00</span> 时 <span class="minute">00</span> 分 <span class="second">00</span> 秒 </div>
		
        <div class="help" id="wejoin">      
                      
          <div class="fx_notice" style="display:block;">
            <p>
            	当前已有 {$cjrs} 人参加
            </p>
          </div>

          <div class="helpdiv"></div>


		 <a href="javascript:void();" class="a1">	 
		 	<img src="__PUBLIC__/styles/default/images/zfc_07.jpg" width="100%" /> 
		 </a>
			
          <div class="notice2">
          <form action="index.php?s=/Wap/Tzhuli/weixinadd/" method="post" enctype="multipart/form-data" onsubmit="return oncheck()">   
                     
			<?php if($is_join) {echo '<p><a style="color:#fff;" href="http://www.dscm.com.cn/xcrm/index.php?s=/Wap/Tzhuli/index/hdid/'.$hdid.'">您已参加活动,<br/>点击浏览你的页面</a></p><a href="javascript:void();" class="none">Close</a>'; }
            else{?> <p>您的姓名:           	
			<input type="text" name="name" value=""  placeholder="点击填写您的姓名" id="name" /></p> 
            <input name="id" type="hidden" value="<?php echo $wx_id;?>" />
            <input name="hdid" type="hidden" value="<?php echo $hdid;?>" />
            <p>您的手机: <input type="text" name="tel" value="" placeholder="点击填写您的手机号" id="tel" /></p>
            <input type="submit" value="提交" class="btn1" />
			<input type="button" value="取消" class="btn1 none" /><?php }?>
			<div class="show"></div>
            <!--<a href="javascript:void();" class="none">Close</a>-->
          </form>
          </div>
          
        </div>
		
        <script>
		$(function(){
		   
			// 我要参加活动点击事件；
		   $(".a1").click(function(){
			  $(".notice2").animate({
				top:'50px',
				left:'12px'
			  });
			});

			$('.none').click(function(){
			  $(".notice2").animate({
				top:'50px',
				left:'-999px'
			  });
			}); 
       
	   		// 查看收钱罐点击事件处理；
            $(".a2").click(function(){
                  $(".notice3").animate({
                    top:'50px',
                    left:'12px'

                  });
                });

                $('.none').click(function(){
                  $(".notice3").animate({
                    top:'50px',
                    left:'-999px'
                  });
                });  


                $(".notice2 input[type='text']").focus(function(){
                  $(this).val("");
                })
            });
        </script>
		
		<img src="__PUBLIC__/styles/default/images/zfc_08.jpg" width="100%" /> 
		<img src="__PUBLIC__/styles/default/images/zfc_09.jpg" width="100%" /> 
		<img src="__PUBLIC__/styles/default/images/zfc_10.jpg" width="100%" /> 
		<img src="__PUBLIC__/styles/default/images/zfc_011.jpg" width="100%" /> 
		<img src="__PUBLIC__/styles/default/images/zfc_012.jpg" width="100%" /> 
		<img src="__PUBLIC__/styles/default/images/zfc_12.jpg" width="100%" /> 
		<img src="__PUBLIC__/styles/default/images/zfc_13.jpg" width="100%" /> 
		<img src="__PUBLIC__/styles/default/images/zfc_14.jpg" width="100%" /> 
		
		<div style="font-size:12px;color:#fff;background:#1eb5be;height:20px;line-height:12px;padding-left:10px;">
			入团人数 <span style="color:#CC0;">{$cjrs}人</span>
		</div>
		
		<div class="list">  
          <h4><span>编号</span><span>姓名</span><span style="width:38%;">手机号</span><span>浏览</span></h4>
          <div class="list_lh">
			  <ul><?php
				$i=1;
				foreach($zhulitop AS $one){?> 
			  <li <?php if($i%2==0) echo "class='lieven'"; ?> > 
			   	<span><?php echo $i;$i++; $wxusz=M('wxuser')->getById($one['uid']); ?></span>
				<span><?php echo utf8Substr($wxusz['name'], 0, 3);?></span>
				<span style="width:38%;"><?php echo hidtel($wxusz['tel']);?></span>
				<span><a href="http://www.dscm.com.cn/xcrm/index.php?s=/Wap/Tzhuli/index/hdid/<?php echo $hdid;?>/fx_id/<?php echo $wxusz['id'];?>/id/<?php echo $wxusz['id'];?>">浏览</a></span>
			  </li>
			  <?php }?>
			  </ul>
          </div>  

		  <h3 style="height:40px;line-height:40px;color:#0548ad;padding-bottom:40px;background:#1eb5be;text-align: center;">咪游网络</h3>    
        </div>


        <div id="footer"> 
		   <a href="http://www.dscm.com.cn/xcrm/index.php?s=/Wap/Tzhuli/index/hdid/{$hdid}" class="retrun"><img src="__PUBLIC__/styles/default/images/zfc_home.png" /></a>
           <a href="tel:0632-5386566">联系我们</a>
		   <a href="http://www.dscm.com.cn/xcrm/index.php?s=/Wap/Tzhuli/show/hdid/{$hdid}">品牌展示</a>
        </div>

    </div> 
</body>
</html>